<template>
	<view>
		<u-button @click="call('user2')" class="u-m-t-50">发起通话</u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				TUICalling:null,
				sdkAppId: 1400631413,
				secretKey:'1d4ed6c29bb3ccf2d5e7ad932066f01ab0cf3a0183a7b0cc042b92cd8c4ebeef',
				user2:'user2',
				userSign2:'eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwqXFqUVGUInilOzEgoLMFCUrQxMDAzNjQxNDY4hMakVBZlEqUNzU1NTIwMAAIlqSmQsSMzM1MLS0MDeBihZnpgPNTXIO9XIydI8KDQ8zyHUsCS9NzYnwdnF3TjHyD3YOiwopygssTXPMdQpwcbVVqgUADBYw*A__',
			}
		},
		created:function(){
			this.TUICalling= uni.requireNativePlugin("TUICallingUniPlugin-TUICallingModule");
		},
		onLoad:function(option){
			let that=this;
			this.TUICalling.login({
			sdkAppID: 0, 
			userID: 'user1',
			userSig: 'eJwtzMEKgkAUheF3mXXIndFRE1oU0SJE0kJpKc4tLmENow5m9O6Zujzfgf-DLvHZsWhYxIQDbDVtUvhs6UYTdw0avhyNepRak2IR9wB8l3vcnR-sNRkcXUopAGDWluq-*RL4OhQ8WCp0H7tZNoTi*j7JjuSrtk3gHatkN2CRbq3O*xLTfay7vEgO4YZ9fyOYMcg_'
			})
		},
		
		methods: {
			//初始化
			call(userId){
				this.TUICalling.call({ userID: userId, type: 1 })
			}
		}
	}
</script>

<style>

</style>
